package com.test.example.controller.server;

import com.xingluo.tools.repeat.anno.RepeatSubmit;
import com.xingluo.tools.result.Result;
import com.xingluo.tools.server.SystemServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ServerController {
    /**
     * 服务器相关信息监控
     */
    @RepeatSubmit
    @GetMapping("/server")
    public Result getServerInfo() throws Exception{
        SystemServer server = new SystemServer();
        server.detectSystemInfo();
        return Result.success(server);
    }
}
